// Copyright (c) 2023 Huawei Device Co., Ltd.
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// TODO: Entities.
use crate::{grammar::*, OtherError, XmlError};

mod attribute;
mod cdata_section;
mod character_data;
mod comment;
mod document;
mod element;
mod error;
mod node;
mod node_list;
mod node_map;
mod node_type;
mod text;
mod xml_decl;

pub use attribute::Attribute;
pub use cdata_section::CdataSection;
pub use character_data::CharacterDataMethod;
pub use comment::Comment;
pub use document::{Document, DocumentMethod};
pub use element::{Element, ElementMethod};
pub use error::DomException;
pub use node_list::NodeList;
pub use node_map::NodeMap;
pub use node_type::NodeType;
pub use text::Text;
pub use xml_decl::Encoding;

pub(crate) use character_data::{CharacterDataBorrowMethod, CharacterDataInternalMethod};
pub(crate) use document::WeakDocument;
pub(crate) use element::WeakElement;
pub use node::{
    ChildNode, ChildNodeMethod, Node, NodeMethod, ParentNode, ParentNodeMethod, ValuedNodeMethod,
};
pub(crate) use node::{
    ChildNodeInternalMethod, ParentNodeInternalMethod, WeakParentNode, WeakParentNodeMethod,
};
pub(crate) use xml_decl::XmlDecl;
